package com.test.java;

import java.util.Scanner;

/**
 * 旧键盘上坏了几个键，于是在敲一段文字的时候，对应的字符就不会出现。
 * 现在给出应该输入的一段文字、以及实际被输入的文字，请你列出肯定坏掉的那些键。
 * =============================================================
 * Version          Author          Date            Description
 * 1.0              白建         2017/12/26             创建
 * =============================================================
 */
public class Java_20
{

    public static void main(String[] args)
    {

        char[] broken = new char[80];
        int length = 0;
        boolean flag;
        Scanner scanner = new Scanner(System.in);
        String firstLine = scanner.nextLine();
        String secondLine = scanner.nextLine();

        for (int i = 0, j = 0; i < firstLine.length(); i++)
        {
            if (j >= secondLine.length() || firstLine.charAt(i) != secondLine.charAt(j))
            {
                int k = 0;
                flag = true;
                for (; k < length; k++)
                {
                    if (broken[k] == Character.toUpperCase(firstLine.charAt(i)))
                    {
                        flag = false;
                        break;
                    }
                }
                if (flag)
                {
                    broken[k] = Character.toUpperCase(firstLine.charAt(i));
                    length = k + 1;
                }
            }
            else
            {
                j++;
            }
        }

        for (int i = 0; i < length; i++)
        {
            System.out.print(broken[i]);
        }
    }
}
